package org.dinnermate.log;

public class ConsoleHandler extends Handler
{
	public ConsoleHandler()
	{
		setFormatter(new SimpleFormatter());
	}

	@Override
	public void publish( LogRecord record )
	{
		String formattedMsg = getFormatter().format(record);
		
		if (record.getLevel().equals(Level.SEVERE))
		{
			System.err.println(formattedMsg);
		}
		else
		{
			System.out.println(formattedMsg);
		}
	}

}
